sql server remove primary key without dropping table
65
sql server remove primary key without dropping table -
IF EXISTS (SELECT * FROM sys.key_constraints
WHERE type = 'PK' AND parent_object_id = OBJECT_ID('MyTable')
AND Name = 'PK_MyTable')
ALTER TABLE MyTable DROP CONSTRAINT PK_MyTable